<template>
	<view>
		<view class="uni-head-line" ></view>
		<view class="uni-head" >
			<image src="https://jy-vote.oss-cn-hangzhou.aliyuncs.com/head-left.png" @tap="back()" mode="widthFix" class="uni-head-back" ></image>
			<view class="uni-head-title">{{title}}</view>
			<image src="https://jy-vote.oss-cn-hangzhou.aliyuncs.com/head-call.png" @tap="call()" mode="widthFix" class="uni-head-back" ></image>
		</view>
	</view>
</template>

<script>
	export default{
		props:{title:{}},
		data(){
			return{
				mobile : ''
			}
		},
		mounted() {
			this.ajax('index/getCustomer',{
				success:(res) => {
					this.mobile = res.msg;
				}
			})
		},
		methods:{
			back(){
				uni.navigateBack()
			},
			call(){
				uni.makePhoneCall({
				    phoneNumber: this.mobile //仅为示例
				});
			}
		}
	}
</script>

<style>
	.uni-head-line{
		height: 90upx;
	}
	.uni-head{
		position: fixed;
		width: calc(100% - 52upx);
		padding:0 26upx;
		display: flex;
		align-items: center;
		height: 90upx;
		top:0;
		left: 0;
		background-color: #FFFFFF;
		z-index: 99;
	}
	
	.uni-head-back{
		display: block;
		height: 36upx;
		width: 36upx;
	}
	.uni-head-title{
		flex: 1;
		text-align: center;
		font-size: 30upx;
		color: #000000;
		font-weight: bold;
	}
</style>
